﻿using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Surface;
using Microsoft.Surface.Presentation;
using Microsoft.Surface.Presentation.Controls;
using Microsoft.Surface.Presentation.Manipulations;
using System.Windows.Media.Animation;

namespace Surfium
{
   
    public class MyElementMenu : ElementMenu
    {

        
        public MyElementMenu()
        {
                
        }
        public static readonly RoutedEvent LoadingStartedEvent = EventManager.RegisterRoutedEvent(
            "LoadingStarted", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(MyElementMenu));

        public static readonly RoutedEvent LoadingSuccessfulEvent = EventManager.RegisterRoutedEvent(
            "LoadingSuccessful", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(MyElementMenu));

        public static readonly RoutedEvent LoadedEmptyEvent = EventManager.RegisterRoutedEvent(
            "LoadedEmpty", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(MyElementMenu));

        public event RoutedEventHandler LoadingStarted
        {
            add { AddHandler(LoadingStartedEvent, value); }
            remove { RemoveHandler(LoadingStartedEvent, value); }
        }

        public event RoutedEventHandler LoadingSuccessful
        {
            add { AddHandler(LoadingSuccessfulEvent, value); }
            remove { RemoveHandler(LoadingSuccessfulEvent, value); }
        }

        public event RoutedEventHandler LoadedEmpty
        {
            add { AddHandler(LoadedEmptyEvent, value); }
            remove { RemoveHandler(LoadedEmptyEvent, value); }
        }

        public void RaiseLoadingStartedEvent()
        {
  
            RoutedEventArgs newEventArgs = new RoutedEventArgs(MyElementMenu.LoadingStartedEvent);
            RaiseEvent(newEventArgs);
        }

        public void RaiseLoadingSuccessfulEvent()
        {
          
            RoutedEventArgs newEventArgs = new RoutedEventArgs(MyElementMenu.LoadingSuccessfulEvent);
            RaiseEvent(newEventArgs);
        }

        public void RaiseLoadedEmptyEvent()
        {
        
            RoutedEventArgs newEventArgs = new RoutedEventArgs(MyElementMenu.LoadedEmptyEvent);
            RaiseEvent(newEventArgs);
        }
    }
}
